<?php

namespace BaseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * UserAddress
 *
 * @ORM\Table(name="user_address", options={"comment":"用户地址表"})
 * @ORM\Entity()
 */
class UserAddress
{
    
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var User
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\User", inversedBy="id")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     */
    private $user;

    /**
     * @var Area
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\Area", inversedBy="id")
     * @ORM\JoinColumn(name="province_id", referencedColumnName="id")
     */
    private $province;

    /**
     * @var Area
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\Area", inversedBy="id")
     * @ORM\JoinColumn(name="city_id", referencedColumnName="id")
     */
    private $city;

    /**
     * @var Area
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\Area", inversedBy="id")
     * @ORM\JoinColumn(name="district_id", referencedColumnName="id")
     */
    private $district;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=45,  nullable=true,options={"comment":"收货人"})
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="contact_way", type="string", length=13, nullable=true, options={"comment":"联系方式"})
     */
    private $contact_way;

    /**
     * @var string
     *
     * @ORM\Column(name="address", type="string", length=255,  nullable=true,options={"comment":"具体地址(不包含省市区地址)"})
     */
    private $address;

    /**
     * @var string
     *
     * @ORM\Column(name="post_code", type="string", length=10,  nullable=true,options={"comment":"邮政编码"})
     */
    private $post_code;
    
    /**
     * @var boolean
     *
     * @ORM\Column(name="is_default", type="boolean", nullable=true, options={"comment":"是否默认  0 否 1 是"})
     */
    private $is_default;
    
}
